#include "QtProj/QGanttChart.qth"
#include "QtProj/QGanttChart.moh"
#include "QtProj/QGanttChartHeader.qth"
#include "QtProj/QGanttChartCanvas.qth"
#include "QtProj/QAbstractGanttModel.qth"
#include <QtGui/QGridLayout>
#include <QtGui/QScrollBar>

namespace QtProj
{

	QGanttChart::QGanttChart( QAbstractGanttModel* pModel /*= NULL*/, QWidget* pParent /*= NULL*/)
		: QWidget( pParent)
		, pHeader_( NULL)
		, pCanvas_( NULL)
		, pVertScrollBar_( NULL)
		, pHorizScrollBar_( NULL)
		, pModel_( pModel)
	{
		QGridLayout* pLayout = new QGridLayout();
		pLayout->setSpacing( 0);
		this->setLayout( pLayout);

		pHeader_ = new QGanttChartHeader;
		pCanvas_ = new QGanttChartCanvas;
		pVertScrollBar_ = new QScrollBar( Qt::Vertical);
		pHorizScrollBar_ = new QScrollBar( Qt::Horizontal);

		pLayout->addWidget( pHeader_, 0, 0);
		pLayout->addWidget( pCanvas_, 1, 0);
		pLayout->addWidget( pVertScrollBar_, 1, 1);
		pLayout->addWidget( pHorizScrollBar_, 2, 0);
	}

// ---------------------------------------------------------------------------------------------------------------------



} // QtProj
